<template>
<div>
  <h2>
    Counter:{{modelValue}}
  </h2>
  <button v-on="{click:changeCounter}">修改counter</button>
</div>
</template>

<script>
export default {
  name: "Counter",
  props:{
    modelValue:{
      type:Number,
      default:0
    }
  },
  emits:['update:modelValue'],
  methods:{
    changeCounter(){
      this.$emit('update:modelValue',911)
    }
  }
}
</script>

<style scoped>

</style>